//@ts-nocheck
function onSdkReady() {
    mraid.addEventListener('viewableChange', function (viewable) {
        if (viewable) {
            //script.startMyGame();
        }
        else {
            cc.log("暂停游戏");
        }
    });

    // if (mraid.isViewable()) {
    //     script.startMyGame();
    // }
}

export function init() {
    console.log("applovin 初始化");
    if (mraid.getState() === 'loading') {
        mraid.addEventListener('ready', function () {
            onSdkReady();
        });
    }
    else {
        onSdkReady();
    }
}


export function openStoreUrl() {
    //applovin家的要求直接调用open就行了。。可能是会自己跳转到对应链接吧。。搞不懂
    mraid.open();
}

export function gameStart() {
}

export function gameEnd() {
}

